namespace Catastrophe.Common.EndeCrypt
{
	public class EncryptFactory
	{
		private readonly IEncrypt _iencrypt;

		public IEncrypt Incrypt => this._iencrypt;

		public EncryptFactory(EndecryptTypeEnum type)
		{
			switch (type)
			{
			case EndecryptTypeEnum.Base64:
				this._iencrypt = new Base64Cal();
				break;
			case EndecryptTypeEnum.MD5:
				this._iencrypt = new Md5Cal();
				break;
			case EndecryptTypeEnum.RSA:
				this._iencrypt = new RsaCal();
				break;
			}
		}
	}
}
